package com.deer.wms.base.system.service.zh.impl;

import com.deer.wms.base.system.dao.zh.electricBox.ElectricBoxItemMapper;
import com.deer.wms.base.system.model.pda.Pdaweight;
import com.deer.wms.base.system.model.pda.PdaweightDto;
import com.deer.wms.base.system.model.zh.BoxInMainList;
import com.deer.wms.base.system.model.zh.ElectricBoxDetail;
import com.deer.wms.base.system.service.zh.ElectricBoxItemService;
import com.deer.wms.base.system.web.zhBusiness.electricBox.ElectricBoxItem;
import com.deer.wms.common.core.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李帅辰
 * @date 2021/6/20 13:43
 */
@Service
public class ElectricBoxItemServiceImpl extends AbstractService<ElectricBoxDetail,Integer> implements ElectricBoxItemService {

    @Autowired
    private ElectricBoxItemMapper electricBoxItemMapper;


    @Override
    public List<BoxInMainList> findElectricBoxDetailByTorr(BoxInMainList boxInMainList) {
        return electricBoxItemMapper.findElectricBoxDetailByTorr(boxInMainList);
    }

    @Override
    public List<BoxInMainList> selectPdatray(BoxInMainList boxInMainList) {
        return electricBoxItemMapper.selectPdatray(boxInMainList);
    }

    @Override
    public List<ElectricBoxDetail> selectAll(ElectricBoxDetail electricBoxDetail) {
        return electricBoxItemMapper.selectBoxAll(electricBoxDetail);
    }

    @Override
    public List<PdaweightDto> selectUnfinished(Pdaweight pdaweight) {
        return electricBoxItemMapper.selectUnfinished(pdaweight);
    }

    @Override
    public String selectWeight(Integer id) {
        return electricBoxItemMapper.selectWeight(id);
    }

    @Override
    public void updateItemLongRange() {
        electricBoxItemMapper.updateItemLongRange();
    }

    @Override
    public List<ElectricBoxDetail> selectElectricBoxDetail(ElectricBoxDetail electricBoxDetail) {
        return electricBoxItemMapper.selectElectricBoxDetail(electricBoxDetail);
    }

    @Override
    public ElectricBoxDetail findElectricBoxDetail(ElectricBoxDetail electricBoxDetail) {
        return electricBoxItemMapper.findElectricBoxDetail(electricBoxDetail);
    }

    @Override
    public boolean InsertElectricBoxItem(ElectricBoxDetail electricBoxDetail) {
        int insert = electricBoxItemMapper.InsertElectricBoxItem(electricBoxDetail);
        return insert > 0;
    }
}
